﻿@{
    Layout = null;

    var theme = ViewContext.HttpContext.Request.Cookies[".theme"];
    var themeClass = theme == "dark" ? "sl-theme-dark netnrmd-dark" : "sl-theme-light netnrmd-light";

    var dscode = ViewContext.RouteData.Values["id"]?.ToString();
    var sid = ViewContext.RouteData.Values["sid"]?.ToString();
    var uinfo = IdentityService.Get(ViewContext.HttpContext);
}
<!DOCTYPE html>
<html lang="zh-cn" class="@themeClass">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] @AppTo.GetValue("Common:EnglishName") Doc</title>

    @Html.Raw(Netnr.QuoteTo.Html("favicon,blog-seo"))
</head>
<body>

    <!--Menu-->
    <nav class="app-nav" style="display:none">
        <ul>
            <li>
                <a title="Theme">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M7 8a3.5 3.5 0 0 1 3.5 3.555.5.5 0 0 0 .625.492A1.503 1.503 0 0 1 13 13.5a1.5 1.5 0 0 1-1.5 1.5H3a2 2 0 1 1 .1-3.998.5.5 0 0 0 .509-.375A3.502 3.502 0 0 1 7 8zm4.473 3a4.5 4.5 0 0 0-8.72-.99A3 3 0 0 0 3 16h8.5a2.5 2.5 0 0 0 0-5h-.027z" />
                        <path d="M11.286 1.778a.5.5 0 0 0-.565-.755 4.595 4.595 0 0 0-3.18 5.003 5.46 5.46 0 0 1 1.055.209A3.603 3.603 0 0 1 9.83 2.617a4.593 4.593 0 0 0 4.31 5.744 3.576 3.576 0 0 1-2.241.634c.162.317.295.652.394 1a4.59 4.59 0 0 0 3.624-2.04.5.5 0 0 0-.565-.755 3.593 3.593 0 0 1-4.065-5.422z" />
                    </svg>
                </a>
            </li>
            <li>
                @if (uinfo == null)
                {
                    <a data-href="/doc/discover" title="Doc discover">Doc</a>
                }
                else
                {
                    <a data-href="/doc/user/@uinfo.UserId" title="Your doc">Doc</a>
                }
            </li>
            <li>
                ⓂMenu
                <ul>
                    @if (uinfo != null)
                    {
                        <li><a data-href="/doc/item/@dscode" title="Add">📝 Add</a></li>
                        <li><a title="Edit">✒ Edit</a></li>
                        <li><a title="Delete">❌ Delete</a></li>
                        <li></li>
                        <li><a data-href="/doc/catalog/@dscode" title="Menu">📁 Catalog</a></li>
                        <li></li>
                    }
                    <li><a title="Word">📄 Word</a></li>
                    <li><a title="Print">🖨 Print</a></li>
                </ul>
            </li>
        </ul>
    </nav>

    <!--Main-->
    <div id="app">Loading ...</div>

    <!--SEO-->
    <div style="display:none">@Html.Raw(ViewData["DocSeo"])</div>

    <link rel="stylesheet" href="/app/docsify-better/dist/docsify-better.css" asp-append-version="true" />
    <script src="/app/docsify-better/dist/docsify-better.js" asp-append-version="true"></script>
    <script src="/js/doc/code.js" asp-append-version="true"></script>
</body>
</html>